package com.spring.sunflower.conversation

import com.spring.sunflower.base.BaseObserver
import com.spring.sunflower.base.BasePresenter
import com.spring.sunflower.bean.TalkRepositoryBean

/**
 * Created by Kevin on 2021/7/30<br/>
 *
 * Describe:<br/>
 */
class TopicPresenter(baseView: ConversationContract.TopicView) :
    BasePresenter<ConversationContract.TopicView>(baseView) {
    fun loadTopicRepository() {
        val observable = requestDataSource.loadTalkRepository()
        addDisposable(observable, object : BaseObserver<TalkRepositoryBean>() {
            override fun onSuccess(bean: TalkRepositoryBean) {
                baseView.showTopic(bean.datas)
            }

            override fun onError(status: Int, msg: String?) {
            }
        });
    }
}